home *** CD-ROM | disk | FTP | other *** search
/ Champak 122 / Vol 122.iso / games / gem_stri.swf / scripts / __Packages / mx / controls / NumericStepper.as < prev    next >
Encoding:
Text File  |  2011-01-06  |  22.6 KB  |  524 lines

  1. var ┬º\x01┬º = 804;
  2. while(true)
  3. {
  4.    if(eval("\x01") == 804)
  5.    {
  6.       set("\x01",eval("\x01") + 83);
  7.       ┬º┬ºpush(true);
  8.    }
  9.    else if(eval("\x01") == 8)
  10.    {
  11.       set("\x01",eval("\x01") + 516);
  12.       if(┬º┬ºpop())
  13.       {
  14.          set("\x01",eval("\x01") - 192);
  15.       }
  16.    }
  17.    else if(eval("\x01") == 914)
  18.    {
  19.       set("\x01",eval("\x01") - 161);
  20.       if(┬º┬ºpop())
  21.       {
  22.          set("\x01",eval("\x01") - 279);
  23.       }
  24.    }
  25.    else if(eval("\x01") == 66)
  26.    {
  27.       set("\x01",eval("\x01") + 848);
  28.       ┬º┬ºpush(true);
  29.    }
  30.    else if(eval("\x01") == 474)
  31.    {
  32.       set("\x01",eval("\x01") + 93);
  33.       ┬º┬ºpush(true);
  34.    }
  35.    else
  36.    {
  37.       if(eval("\x01") == 524)
  38.       {
  39.          set("\x01",eval("\x01") - 192);
  40.          ┬º┬ºpush(┬º┬ºpop() >>> (┬º┬ºpop() | ┬º┬ºpop()[┬º┬ºpop()]));
  41.          break;
  42.       }
  43.       if(eval("\x01") == 753)
  44.       {
  45.          set("\x01",eval("\x01") - 279);
  46.          ┬º┬ºpush(┬º┬ºpop() >>> ┬º┬ºpop());
  47.          break;
  48.       }
  49.       if(eval("\x01") == 959)
  50.       {
  51.          set("\x01",eval("\x01") - 893);
  52.          break;
  53.       }
  54.       if(eval("\x01") == 332)
  55.       {
  56.          set("\x01",eval("\x01") + 206);
  57.          if(!_global.mx)
  58.          {
  59.             _global.mx = new Object();
  60.          }
  61.          ┬º┬ºpop();
  62.          if(!_global.mx.controls)
  63.          {
  64.             _global.mx.controls = new Object();
  65.          }
  66.          ┬º┬ºpop();
  67.          if(!_global.mx.controls.NumericStepper)
  68.          {
  69.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().init = function()
  70.             {
  71.                super.init();
  72.                this.boundingBox_mc._visible = false;
  73.                this.boundingBox_mc._width = this.boundingBox_mc._height = 0;
  74.                this._visible = false;
  75.                this.tabEnabled = false;
  76.                this.tabChildren = true;
  77.             };
  78.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().setVisible = function(x, noEvent)
  79.             {
  80.                super.setVisible(x,noEvent);
  81.                if(this.initializing)
  82.                {
  83.                   this.__visible = x;
  84.                }
  85.             };
  86.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().layoutControl = function()
  87.             {
  88.                this.nextButton_mc._x = this.__width - this.nextButton_mc.__width;
  89.                this.nextButton_mc._y = 0;
  90.                this.prevButton_mc._x = this.__width - this.prevButton_mc.__width;
  91.                this.prevButton_mc._y = this.__height - this.prevButton_mc.__height;
  92.                this.inputField.setSize(this.__width - this.nextButton_mc.__width,this.__height);
  93.                this.StepTrack_mc._width = Math.max(this.nextButton_mc.__width,this.prevButton_mc.__width);
  94.                this.StepTrack_mc._x = this.__width - this.StepTrack_mc._width;
  95.                this.StepTrack_mc._height = this.__height - (this.nextButton_mc._height + this.prevButton_mc._height);
  96.                this.StepTrack_mc._y = this.nextButton_mc.__height;
  97.             };
  98.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().createChildren = function()
  99.             {
  100.                super.createChildren();
  101.                this.addAsset("nextButton_mc",this.skinIDUpArrow);
  102.                this.addAsset("prevButton_mc",this.skinIDDownArrow);
  103.                this.addAsset("inputField",this.skinIDInput);
  104.                this.focusTextField = this.inputField.label;
  105.                this.createObject("StepTrack","StepTrack_mc",2);
  106.                this.size();
  107.             };
  108.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().draw = function()
  109.             {
  110.                this.prevButton_mc.enabled = this.enabled;
  111.                this.nextButton_mc.enabled = this.enabled;
  112.                this.inputField.enabled = this.enabled;
  113.                this.size();
  114.                this.initializing = false;
  115.                this.visible = this.__visible;
  116.             };
  117.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().size = function()
  118.             {
  119.                var _loc2_ = this.calcMinHeight();
  120.                var _loc3_ = this.calcMinWidth();
  121.                if(this.__height < _loc2_)
  122.                {
  123.                   this.setSize(this.__width,_loc2_);
  124.                }
  125.                if(this.__width < _loc3_)
  126.                {
  127.                   this.setSize(_loc3_,this.__height);
  128.                }
  129.                this.layoutControl();
  130.             };
  131.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().calcMinHeight = function()
  132.             {
  133.                return 22;
  134.             };
  135.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().calcMinWidth = function()
  136.             {
  137.                return 40;
  138.             };
  139.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().addAsset = function(id, skinID)
  140.             {
  141.                var _loc2_ = new Object();
  142.                _loc2_.styleName = this;
  143.                if(skinID == 10)
  144.                {
  145.                   _loc2_.falseUpSkin = this.upArrowUp;
  146.                   _loc2_.falseOverSkin = this.upArrowOver;
  147.                   _loc2_.falseDownSkin = this.upArrowDown;
  148.                   _loc2_.falseDisabledSkin = this.upArrowDisabled;
  149.                   this.createClassObject(mx.controls.SimpleButton,id,skinID,_loc2_);
  150.                   var _loc5_ = this.nextButton_mc;
  151.                   _loc5_.tabEnabled = false;
  152.                   _loc5_.styleName = this;
  153.                   _loc5_._x = this.__width - _loc5_.__width;
  154.                   _loc5_._y = 0;
  155.                   _loc5_.owner = this;
  156.                   _loc5_.autoRepeat = true;
  157.                   _loc5_.clickHandler = function()
  158.                   {
  159.                      Selection.setSelection(0,0);
  160.                   };
  161.                   _loc5_.buttonDownHandler = function()
  162.                   {
  163.                      this.owner.buttonPress(this);
  164.                   };
  165.                }
  166.                else if(skinID == 11)
  167.                {
  168.                   _loc2_.falseUpSkin = this.downArrowUp;
  169.                   _loc2_.falseOverSkin = this.downArrowOver;
  170.                   _loc2_.falseDownSkin = this.downArrowDown;
  171.                   _loc2_.falseDisabledSkin = this.downArrowDisabled;
  172.                   this.createClassObject(mx.controls.SimpleButton,id,skinID,_loc2_);
  173.                   var _loc3_ = this.prevButton_mc;
  174.                   _loc3_.tabEnabled = false;
  175.                   _loc3_.styleName = this;
  176.                   _loc3_._x = this.__width - _loc3_.__width;
  177.                   _loc3_._y = this.__height - _loc3_.__height;
  178.                   _loc3_.owner = this;
  179.                   _loc3_.autoRepeat = true;
  180.                   _loc3_.clickHandler = function()
  181.                   {
  182.                      Selection.setSelection(0,0);
  183.                   };
  184.                   _loc3_.buttonDownHandler = function()
  185.                   {
  186.                      this.owner.buttonPress(this);
  187.                   };
  188.                }
  189.                else if(skinID == 9)
  190.                {
  191.                   this.createClassObject(mx.controls.TextInput,id,skinID);
  192.                   var _loc4_ = this.inputField;
  193.                   _loc4_.styleName = this;
  194.                   _loc4_.setSize(this.__width - this.nextButton_mc.__width,this.__height);
  195.                   _loc4_.restrict = "0-9\\-\\.\\,";
  196.                   _loc4_.maxChars = this.__maxChars;
  197.                   _loc4_.text = this.value;
  198.                   _loc4_.onSetFocus = function()
  199.                   {
  200.                      this._parent.onSetFocus();
  201.                   };
  202.                   _loc4_.onKillFocus = function()
  203.                   {
  204.                      this._parent.onKillFocus();
  205.                   };
  206.                   _loc4_.drawFocus = function(b)
  207.                   {
  208.                      this._parent.drawFocus(b);
  209.                   };
  210.                   _loc4_.onKeyDown = function()
  211.                   {
  212.                      this._parent.onFieldKeyDown();
  213.                   };
  214.                }
  215.             };
  216.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().setFocus = function()
  217.             {
  218.                Selection.setFocus(this.inputField);
  219.             };
  220.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().onKillFocus = function()
  221.             {
  222.                mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
  223.                super.onKillFocus();
  224.                Key.removeListener(this.inputField);
  225.                if(Number(this.inputField.text) != this.value)
  226.                {
  227.                   var _loc3_ = this.checkValidValue(Number(this.inputField.text));
  228.                   this.inputField.text = _loc3_;
  229.                   this.value = _loc3_;
  230.                   this.dispatchEvent({type:"change"});
  231.                }
  232.             };
  233.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().onSetFocus = function()
  234.             {
  235.                super.onSetFocus();
  236.                Key.addListener(this.inputField);
  237.                mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
  238.             };
  239.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().onFieldKeyDown = function()
  240.             {
  241.                var _loc2_ = this.value;
  242.                switch(Key.getCode())
  243.                {
  244.                   case 40:
  245.                      var _loc3_ = this.value - this.stepSize;
  246.                      this.value = _loc3_;
  247.                      if(_loc2_ != this.value)
  248.                      {
  249.                         this.dispatchEvent({type:"change"});
  250.                      }
  251.                      break;
  252.                   case 38:
  253.                      _loc3_ = this.stepSize + this.value;
  254.                      this.value = _loc3_;
  255.                      if(_loc2_ != this.value)
  256.                      {
  257.                         this.dispatchEvent({type:"change"});
  258.                      }
  259.                      break;
  260.                   case 36:
  261.                      this.inputField.text = this.minimum;
  262.                      this.value = this.minimum;
  263.                      if(_loc2_ != this.value)
  264.                      {
  265.                         this.dispatchEvent({type:"change"});
  266.                      }
  267.                      break;
  268.                   case 35:
  269.                      this.inputField.text = this.maximum;
  270.                      this.value = this.maximum;
  271.                      if(_loc2_ != this.value)
  272.                      {
  273.                         this.dispatchEvent({type:"change"});
  274.                      }
  275.                      break;
  276.                   case 13:
  277.                      this.value = Number(this.inputField.text);
  278.                      if(_loc2_ != this.value)
  279.                      {
  280.                         this.dispatchEvent({type:"change"});
  281.                         break;
  282.                      }
  283.                }
  284.             };
  285.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__nextValue = function()
  286.             {
  287.                if(this.checkRange(this.value + this.stepSize))
  288.                {
  289.                   this.__nextValue = this.value + this.stepSize;
  290.                   return this.__nextValue;
  291.                }
  292.             };
  293.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__previousValue = function()
  294.             {
  295.                if(this.checkRange(this.__value - this.stepSize))
  296.                {
  297.                   this.__previousValue = this.value - this.stepSize;
  298.                   return this.__previousValue;
  299.                }
  300.             };
  301.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__maxChars = function(num)
  302.             {
  303.                this.__maxChars = num;
  304.                this.inputField.maxChars = this.__maxChars;
  305.                return this.maxChars;
  306.             };
  307.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__maxChars = function()
  308.             {
  309.                return this.__maxChars;
  310.             };
  311.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__value = function()
  312.             {
  313.                return this.__value;
  314.             };
  315.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__value = function(v)
  316.             {
  317.                var _loc2_ = this.checkValidValue(v);
  318.                if(_loc2_ == this.__value)
  319.                {
  320.                   return undefined;
  321.                }
  322.                this.inputField.text = this.__value = _loc2_;
  323.                return this.value;
  324.             };
  325.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__minimum = function()
  326.             {
  327.                return this.__minimum;
  328.             };
  329.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__minimum = function(v)
  330.             {
  331.                this.__minimum = v;
  332.                return this.minimum;
  333.             };
  334.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__maximum = function()
  335.             {
  336.                return this.__maximum;
  337.             };
  338.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__maximum = function(v)
  339.             {
  340.                this.__maximum = v;
  341.                return this.maximum;
  342.             };
  343.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__stepSize = function()
  344.             {
  345.                return this.__stepSize;
  346.             };
  347.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__stepSize = function(v)
  348.             {
  349.                this.__stepSize = v;
  350.                return this.stepSize;
  351.             };
  352.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().onFocus = function()
  353.             {
  354.             };
  355.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().buttonPress = function(button)
  356.             {
  357.                var _loc2_ = this.value;
  358.                if(button._name == "nextButton_mc")
  359.                {
  360.                   this.value += this.stepSize;
  361.                }
  362.                else
  363.                {
  364.                   this.value -= this.stepSize;
  365.                }
  366.                if(_loc2_ != this.value)
  367.                {
  368.                   this.dispatchEvent({type:"change"});
  369.                   Selection.setSelection(0,0);
  370.                }
  371.             };
  372.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().checkRange = function(v)
  373.             {
  374.                return v >= this.minimum and v <= this.maximum;
  375.             };
  376.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().checkValidValue = function(val)
  377.             {
  378.                var _loc7_ = val / this.stepSize;
  379.                var _loc9_ = Math.floor(_loc7_);
  380.                var _loc2_ = this.stepSize;
  381.                var _loc6_ = this.minimum;
  382.                var _loc5_ = this.maximum;
  383.                if(val > _loc6_ and val < _loc5_)
  384.                {
  385.                   if(_loc7_ - _loc9_ == 0)
  386.                   {
  387.                      return val;
  388.                   }
  389.                   var _loc8_ = Math.floor(val / _loc2_);
  390.                   var _loc4_ = _loc8_ * _loc2_;
  391.                   if(val - _loc4_ >= _loc2_ / 2 && _loc5_ >= _loc4_ + _loc2_ && _loc6_ <= _loc4_ - _loc2_ || val + _loc2_ == _loc5_ && _loc5_ - _loc4_ - _loc2_ > 1e-14)
  392.                   {
  393.                      _loc4_ += _loc2_;
  394.                   }
  395.                   return _loc4_;
  396.                }
  397.                if(val >= _loc5_)
  398.                {
  399.                   return _loc5_;
  400.                }
  401.                return _loc6_;
  402.             };
  403.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().onLabelChanged = function(o)
  404.             {
  405.                var _loc2_ = this.checkValidValue(Number(o.text));
  406.                o.text = _loc2_;
  407.                this.value = _loc2_;
  408.             };
  409.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__tabIndex = function()
  410.             {
  411.                return this.inputField.tabIndex;
  412.             };
  413.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__tabIndex = function(w)
  414.             {
  415.                this.inputField.tabIndex = w;
  416.                return this.tabIndex;
  417.             };
  418.             mx.controls.NumericStepper = function()
  419.             {
  420.                super();
  421.             }.symbolName = "NumericStepper";
  422.             mx.controls.NumericStepper = function()
  423.             {
  424.                super();
  425.             }.symbolOwner = mx.controls.NumericStepper;
  426.             mx.controls.NumericStepper = function()
  427.             {
  428.                super();
  429.             }.version = "2.0.2.126";
  430.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().className = "NumericStepper";
  431.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().upArrowUp = "StepUpArrowUp";
  432.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().upArrowDown = "StepUpArrowDown";
  433.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().upArrowOver = "StepUpArrowOver";
  434.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().upArrowDisabled = "StepUpArrowDisabled";
  435.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().downArrowUp = "StepDownArrowUp";
  436.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().downArrowDown = "StepDownArrowDown";
  437.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().downArrowOver = "StepDownArrowOver";
  438.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().downArrowDisabled = "StepDownArrowDisabled";
  439.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().skinIDUpArrow = 10;
  440.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().skinIDDownArrow = 11;
  441.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().skinIDInput = 9;
  442.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().initializing = true;
  443.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__visible = true;
  444.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__minimum = 0;
  445.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__maximum = 10;
  446.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__stepSize = 1;
  447.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__value = 0;
  448.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__nextValue = 0;
  449.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__previousValue = 0;
  450.             mx.controls.NumericStepper.prototype = new mx.core.UIComponent().clipParameters = {minimum:1,maximum:1,stepSize:1,value:1,maxChars:1};
  451.             mx.controls.NumericStepper = function()
  452.             {
  453.                super();
  454.             }.mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters,mx.core.UIComponent.prototype.clipParameters);
  455.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("maxChars",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__maxChars,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__maxChars));
  456.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("maximum",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__maximum,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__maximum));
  457.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("minimum",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__minimum,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__minimum));
  458.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("nextValue",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__nextValue,function()
  459.             {
  460.             }
  461.             ));
  462.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("previousValue",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__previousValue,function()
  463.             {
  464.             }
  465.             ));
  466.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("stepSize",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__stepSize,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__stepSize));
  467.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("tabIndex",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__tabIndex,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__tabIndex));
  468.             ┬º┬ºpush((mx.controls.NumericStepper.prototype = new mx.core.UIComponent()).addProperty("value",mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__get__value,mx.controls.NumericStepper.prototype = new mx.core.UIComponent().__set__value));
  469.             ┬º┬ºpush(ASSetPropFlags(mx.controls.NumericStepper.prototype,null,1));
  470.          }
  471.          ┬º┬ºpop();
  472.          break;
  473.       }
  474.       if(eval("\x01") == 961)
  475.       {
  476.          set("\x01",eval("\x01") - 658);
  477.          break;
  478.       }
  479.       if(eval("\x01") == 14)
  480.       {
  481.          set("\x01",eval("\x01") + 77);
  482.          break;
  483.       }
  484.       if(eval("\x01") == 732)
  485.       {
  486.          set("\x01",eval("\x01") - 718);
  487.          if(┬º┬ºpop())
  488.          {
  489.             set("\x01",eval("\x01") + 77);
  490.          }
  491.       }
  492.       else if(eval("\x01") == 91)
  493.       {
  494.          set("\x01",eval("\x01") - 83);
  495.          ┬º┬ºpush(true);
  496.       }
  497.       else if(eval("\x01") == 303)
  498.       {
  499.          set("\x01",eval("\x01") + 429);
  500.          ┬º┬ºpush(true);
  501.       }
  502.       else if(eval("\x01") == 887)
  503.       {
  504.          set("\x01",eval("\x01") + 72);
  505.          if(┬º┬ºpop())
  506.          {
  507.             set("\x01",eval("\x01") - 893);
  508.          }
  509.       }
  510.       else
  511.       {
  512.          if(eval("\x01") != 567)
  513.          {
  514.             break;
  515.          }
  516.          set("\x01",eval("\x01") + 394);
  517.          if(┬º┬ºpop())
  518.          {
  519.             set("\x01",eval("\x01") - 658);
  520.          }
  521.       }
  522.    }
  523. }
  524.